package com.demo.listener;

import com.demo.event.DemoEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/*
* 监听事件的类
* */
@Component
public class DemoApplicationListener implements ApplicationListener<DemoEvent> {



    @Override
    public void onApplicationEvent(DemoEvent demoEvent) {
      demoEvent.eventPublic();
    }
}
